<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>充值中心</title>
        <link rel="stylesheet" href="__PUBLIC__/Leader/css/bootstrap.css">
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/Leader/css/index.css" />
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/Leader/css/bootstrap-datetimepicker.css"/>
        <style type="text/css">
            .order-list a {
                position: relative;
            }
            .order-list span {
                float: right;
                margin-right: 20px;
            }
        </style>
    </head>
    <body>
        <include file="Index/head"/>
        <style>
            .cz-table tr th{
                border-bottom-width:0!important;
                background-color:#fff!important;
            }
        </style>
        <div class="wrapper main-wrapper wrapper-content ">
            <div class="page-menubar">
                <!--<div class="menu-header">系统管理</div>-->
                <ul class="order-list">
                    <li>
                        <a href="{:U('Pay/paycount')}"><img src="__PUBLIC__/images/ic7.png" alt="" class="com-icon">交易统计 </a>
                    </li>
                    <li class="active">
                        <a href="{:U('Pay/czadmin')}"><img src="__PUBLIC__/images/ic-8.png" alt="" class="com-icon">充值中心</a>
                    </li>
                </ul>
            </div>
            <!--主要内容-->
            <div class="page-content" style="display: block;">
                <!--内容标题-->
                <div class="page-heading" style="position:relative;">
                    <h2>充值管理</h2>
                </div>
                <div class="panel panel-default" style="margin-top: 20px;">
                    <div class="panel-body">
                        <form action="" method="post" class="form-horizontal table-search" role="form" style="margin-bottom:20px;">
                            <div class="page-toolbar row m-b-sm m-t-sm">
                                <div class="col-sm-12 pull-left">
                                    <div class="input-group col-sm-12">
                                        <input type="text" name="wtime" id="wtime" placeholder="选择起始时间" class="input-sm  col-sm-2" readonly="readonly" style="border:1px solid #f4f4f4;">
                                        <input type="text" name="ntime" id="ntime" placeholder="选择终止时间" class="input-sm  col-sm-2" readonly="readonly" style="border:1px solid #f4f4f4;">
                                        <span class="input-group-btn pull-left">
                                            <button class="btn btn-sm btnGray btn-primary" type="submit" name="submit"> 筛选</button>
                                        </span>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <div>
                            <table class="table cz-table" id="tab" data-sortable>
                                <thead>
                                    <th colspan="4">统计区间-{$wtime}-{$ntime}</th>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>总计金额：{$zsum}</td>
                                    <td>充值笔数：{$zcount}</td>
                                    <td>充值金额{$psum}</td>
                                    <td>赠送金额{$fsum}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="">
                            <table class="table table-hover table-responsive" id="tab" data-sortable>
                                <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>联系人</th>
                                        <th>电话</th>

                                        <th>充值金额</th>
                                        <th>赠送金额</th>
                                        <th>充值时间</th>
                                    </tr>
                                </thead>
                                <tbody>
                                <volist name="cz" id="vo">
                                    <tr>
                                        <td>{$vo.id}</td>
                                        <td width=''>{:get_username($vo['openid'])}</td>
                                        <td width=''>{:get_usertel($vo['openid'])}</td>

                                        <td>{$vo['price']}</td>
                                        <td>{$vo['free']}</td>
                                        <td width='200px;'>{$vo['addtime']|date='Y-m-d H:i:s',###}</td>
                                    </tr>
                                </volist>
                                </tbody>
                            </table>
                        </div>
                        {$page}
                    </div>
                </div>
            </div>
    </body>
    <script src="__PUBLIC__/Leader/js/jquery.js" type="text/javascript" charset="utf-8"></script>
    <script src="__PUBLIC__/Leader/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="__PUBLIC__/Leader/js/bootstrap-datetimepicker.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
    $(function () {
        var myDate = new Date();
        $('#wtime').datetimepicker({
            minView: "month", //选择日期后，不会再跳转去选择时分秒
            language: 'zh-CN',
            format: 'yyyy-mm-dd',
            todayBtn: 1,
            autoclose: 1,
            todayHighlight: true,
            endDate: myDate.toLocaleDateString()
        });
        $('#ntime').datetimepicker({
            minView: "month", //选择日期后，不会再跳转去选择时分秒
            language: 'zh-CN',
            format: 'yyyy-mm-dd',
            todayBtn: 1,
            autoclose: 1,
            todayHighlight: true,
            endDate: myDate.toLocaleDateString()
        });
    })
</script>

</html>